from fastapi import APIRouter

app01 = APIRouter()


# 路由匹配的顺序
@app01.get("/user/{id}")
def get_user(id):
    print(id)
    return {"user_id": id}


@app01.get("/articles/{id}")
def get_articles(id: int):
    print(id)
    return {"articles_id": id}
